--------------------------------------------------------------------------------
--
--                    Items.lua
--  This LUA script is a repository for all of the usable items within the game
--  as well as their object IDs. See design documentation for information on
--  how identifiers are allocated.
--  
--  This file controls item IDs 1-1000. There really shouldn't be this many 
--  items but that will be the range just to give enough leeway for whatever
--  may be needed.
--  
--  Items organization within this file:
--    1-50: Healing types: herbs, potions etc
--    101-150: Stat-boosting items
--    
--local newgt = {}                     -- create new environment
--setmetatable(newgt, {__index = _G})
--Items = newgt                         -- set environment to be name of map
--setfenv(1, newgt)

-- if items are not already initialized, initialize array
if (Items == nil) then  
  Items = {}
end

--
-- 1:50
--
Items[1] = {
  name = "Herbal Salve",
  description = "Provides relief to minor injuries.",
  price = 10,
  icon = "data/Images/Icons/herb.png",
  target_type = 0, -- OForce.GenericItem.ALLY,
  Use = function(target) 
    return target:Heal(10);
  end,
--  In battle: Set up action scene with user and target
--  register healing
  BattleUse = function(user, target)
    return user:actionSequenceUsePotion(target,"Herbal Salve", 10);
  end
}
